// let baseURL="http://110.42.175.49:21125/"   //网上接口
let baseURL = "http://192.168.124.2:21125/" //本地接口
// let URL = "http://test.static.bowu66.com/"
function request(url,data={},method="get"){
let token = wx.getStorageSync("token")
  return new Promise((resolve,reject)=>{
    wx.request({
      url: baseURL+url,
      data:data,
      method:method,
      header:{
          "content-type":"application/json",
          token:token,
          appId:'wx2bd5ac33dfb6caac'
      },
      success:(result)=>{
        resolve(result)
      },
      fail:(err)=>{
        reject(err)
      }
    })
  })
}

module.exports={
  request
}

